package homework14;

/*
    Staff测试类
 */

public class Work1_StaffTest {

    public static void main(String[] args) {

        //声明Staff类型的引用
        Work1_Staff s1 = null;
        try {
            //调用有参构造给对象的成员变量进行初始化，并将对象地址赋值给引用变量s1
            s1 = new Work1_Staff("关羽", 151);
        } catch (Work1_AgeException e) {
            e.printStackTrace();
        } catch (Work1_NullException e) {
            e.printStackTrace();
        }
        //打印对象s1中成员变量值
        System.out.println(s1);
    }
}
